package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SupplierInfoMapper;
import com.ruoyi.system.domain.SupplierInfo;
import com.ruoyi.system.service.ISupplierInfoService;

/**
 * 供货商信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-31
 */
@Service
public class SupplierInfoServiceImpl implements ISupplierInfoService 
{
    @Autowired
    private SupplierInfoMapper supplierInfoMapper;

    /**
     * 查询供货商信息
     * 
     * @param supplierCode 供货商信息主键
     * @return 供货商信息
     */
    @Override
    public SupplierInfo selectSupplierInfoBySupplierCode(String supplierCode)
    {
        return supplierInfoMapper.selectSupplierInfoBySupplierCode(supplierCode);
    }

    /**
     * 查询供货商信息列表
     * 
     * @param supplierInfo 供货商信息
     * @return 供货商信息
     */
    @Override
    public List<SupplierInfo> selectSupplierInfoList(SupplierInfo supplierInfo)
    {
        return supplierInfoMapper.selectSupplierInfoList(supplierInfo);
    }

    /**
     * 新增供货商信息
     * 
     * @param supplierInfo 供货商信息
     * @return 结果
     */
    @Override
    public int insertSupplierInfo(SupplierInfo supplierInfo)
    {
        return supplierInfoMapper.insertSupplierInfo(supplierInfo);
    }

    /**
     * 修改供货商信息
     * 
     * @param supplierInfo 供货商信息
     * @return 结果
     */
    @Override
    public int updateSupplierInfo(SupplierInfo supplierInfo)
    {
        return supplierInfoMapper.updateSupplierInfo(supplierInfo);
    }

    /**
     * 批量删除供货商信息
     * 
     * @param supplierCodes 需要删除的供货商信息主键
     * @return 结果
     */
    @Override
    public int deleteSupplierInfoBySupplierCodes(String[] supplierCodes)
    {
        return supplierInfoMapper.deleteSupplierInfoBySupplierCodes(supplierCodes);
    }

    /**
     * 删除供货商信息信息
     * 
     * @param supplierCode 供货商信息主键
     * @return 结果
     */
    @Override
    public int deleteSupplierInfoBySupplierCode(String supplierCode)
    {
        return supplierInfoMapper.deleteSupplierInfoBySupplierCode(supplierCode);
    }
}
